package com.yingpai.fitness.dvp_2_0.main.util;

import android.widget.Toast;

import com.yingpai.fitness.dvp_2_0.common.util.ContextUtil;

/**
 * Created by ASUS on 2018/12/17.
 */

public class ToastUtil {
    private static Toast mShorToast;
    public static void showToast(String message){
        if(mShorToast==null){
            mShorToast = Toast.makeText(ContextUtil.getContext(),message,Toast.LENGTH_SHORT);
        }else{
            mShorToast.setText(message);
        }
        mShorToast.show();
    }

    private static Toast mLongToast;
    public static void showLongToast(String message){
        if(mLongToast==null){
            mLongToast = Toast.makeText(ContextUtil.getContext(),message,Toast.LENGTH_LONG);
        }else{
            mLongToast.setText(message);
        }
        mLongToast.show();
    }
}
